<?php

/**
 */

namespace Acme\DomotiqueBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
 * @ORM\Entity
 * @ORM\Table(name="elements")
 */
class Element
{
	/**
     * @ORM\Id 
     * @ORM\Column(type="integer") 
     * @ORM\GeneratedValue(strategy="AUTO")
     */
	protected $id;
	/**
     * @ORM\Column(type="string") 
     */
	protected $name;
	/**
     * @ORM\Column(type="integer") 
     */
	protected $room;
	/**
     * @ORM\Column(type="string") 
     */
	protected $arduino;
	/**
     * @ORM\Column(type="integer") 
     */
	protected $pin_id;
	/**
     * @ORM\Column(type="integer") 
     */
    protected $current_value;
    /**
     * @ORM\Column(type="string", nullable=true) 
     */
    protected $current_color;
    /**
     * @ORM\Column(type="string") 
     */
    protected $type;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return Elements
     */
    public function setName($name)
    {
        $this->name = $name;
    
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set room
     *
     * @param integer $room
     * @return Elements
     */
    public function setRoom($room)
    {
        $this->room = $room;
    
        return $this;
    }

    /**
     * Get room
     *
     * @return integer 
     */
    public function getRoom()
    {
        return $this->room;
    }

    /**
     * Set arduino_id
     *
     * @param integer $arduinoId
     * @return Elements
     */
    public function setArduinoId($arduinoId)
    {
        $this->arduino_id = $arduinoId;
    
        return $this;
    }

    /**
     * Get arduino_id
     *
     * @return integer 
     */
    public function getArduinoId()
    {
        return $this->arduino_id;
    }

    /**
     * Set pin_id
     *
     * @param integer $pinId
     * @return Elements
     */
    public function setPinId($pinId)
    {
        $this->pin_id = $pinId;
    
        return $this;
    }

    /**
     * Get pin_id
     *
     * @return integer 
     */
    public function getPinId()
    {
        return $this->pin_id;
    }

    /**
     * Set current_value
     *
     * @param integer $currentValue
     * @return Elements
     */
    public function setCurrentValue($currentValue)
    {
        $this->current_value = $currentValue;
    
        return $this;
    }

    /**
     * Get current_value
     *
     * @return integer 
     */
    public function getCurrentValue()
    {
        return $this->current_value;
    }

    public function __toArray()
    {
        foreach($this as $var=>$val)
        {
            $tab[$var] = $val;
        }
        return $tab;
    }

    /**
     * Set arduino
     *
     * @param string $arduino
     * @return Element
     */
    public function setArduino($arduino)
    {
        $this->arduino = $arduino;
    
        return $this;
    }

    /**
     * Get arduino
     *
     * @return string 
     */
    public function getArduino()
    {
        return $this->arduino;
    }

    /**
     * Set type
     *
     * @param string $type
     * @return Element
     */
    public function setType($type)
    {
        $this->type = $type;
    
        return $this;
    }

    /**
     * Get type
     *
     * @return string 
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set current_color
     *
     * @param string $currentColor
     * @return Element
     */
    public function setCurrentColor($currentColor)
    {
        $this->current_color = $currentColor;
    
        return $this;
    }

    /**
     * Get current_color
     *
     * @return string 
     */
    public function getCurrentColor()
    {
        return $this->current_color;
    }
}